<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<ui:decorate template="templete/layout.xhtml">
	<ui:define name="centro">




		<h:form>
			<p:dataTable id="tabelaCarros" value="#{carroBean.carros}" var="c">
			        <f:facet name="header">
            In-Cell Editing
        </f:facet>
				<p:column>
					<f:facet name="header">Marca</f:facet>
					<h:outputText value="#{c.marca}" />
				</p:column>
				<p:column>
					<f:facet name="header">Modelo</f:facet>
					<h:outputText value="#{c.modelo}" />
				</p:column>
				<p:column>
					<f:facet name="header">Ano</f:facet>
					<h:outputText value="#{c.ano}" />
				</p:column>
				<p:column>
					<f:facet name="header">Cor</f:facet>
					<h:outputText value="#{c.cor}" />
				</p:column>
				<p:column>
					<f:facet name="header">Placa</f:facet>
					<h:outputText value="#{c.placa}" />
				</p:column>
			</p:dataTable>

			<h:commandLink>
				<p:graphicImage value="/imagens/xls.png" />
				<p:dataExporter type="xls" target="tabelaCarros" fileName="carros" />
			</h:commandLink>
			<h:commandLink>
				<p:graphicImage value="/imagens/pdf.png" />
				<p:dataExporter type="pdf" target="tabelaCarros" fileName="carros" />
			</h:commandLink>
		</h:form>




	</ui:define>
</ui:decorate>
</html>
